<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title></title>
    <link href="/styles/base.css" rel="stylesheet" type="text/css">
    <link href="/styles/regist.css" rel="stylesheet" type="text/css">
    <script type="text/javascript" src="/js/jquery/jquery.js"></script>
    <script type="text/javascript" src="/js/plugins/jquery-form/jquery.form.js"></script>
    <script src="/js/plugins/js-cookie/js.cookie.min.js"></script>
    <script src="/js/vue/md5.js"></script>
    <script type="text/javascript" src="/js/vue/common.js"></script>
    <script type="text/javascript" src="/js/system/regist.js"></script>

</head>
<body>
<script>
    $(function () {
        //需求：页面通过 /users/currentUser 接口获取到redis中当前登录用户信息（注意需要携带参数token）
        /*$.ajax({
            url:domainUrl+"/users/currentUser",
            data:{},
            beforeSend:function (xhr) {  //请求发送前执行逻辑
                // xhr：ajax执行对象
                //getToken()：前端自定义方法，获取到前面存储在cookie中的 token
                xhr.setRequestHeader("token", Cookies.get('token'));
            },
            success:function (data) {
                console.log(data);
            }
        })*/
        // 上面代码进行封装，使用以下代码进行调用
        /*ajaxGet("/users/currentUser", {}, function (data) {
            console.log(data);
        })

       ajaxGet("/travels/info", {}, function (data) {
            console.log(data, 1);
        })

        ajaxGet("/travels/updateInfo", {}, function (data) {
            console.log(data, 2);
        })*/

        //防篡改操作
        ajaxGet("/test2", {aa:1, cc:2, bb:3}, function (data) {
            console.log(data);
        })

    })

</script>



</body>
</html>